home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / gfx / show / MerlinGfx.lha / modeinfo.h < prev    next >
C/C++ Source or Header  |  1995-06-07  |  5KB  |  149 lines

  1. /***********************************************************/
  2. /*      _  __ __                                           */
  3. /*  /_//_)/_ (                                             */
  4. /* / //( (_/__)|/STEM   written by H.Raaf © 1992-93        */
  5. /*             /                                           */
  6. /*                           ProDev / X-Pert               */
  7. /*                                                         */
  8. /***********************************************************/
  9. /*                                                         */
  10. /*   Definition der ModeInfo Strukture                     */
  11. /*                                                         */
  12. /***********************************************************/
  13.  
  14. #ifndef HRG_MODEINFO_H
  15. #define HRG_MODEINFO_H
  16.  
  17. /* Definitions for the BitMapTypes */
  18.  
  19. #ifndef HRG_BITMAP_H
  20. #include <hrg/bitmap.h>
  21. #endif
  22.  
  23. #ifndef EXEC_TYPES_H
  24. #include <exec/types.h>
  25. #endif
  26.  
  27. /* Structure for Mode Info */
  28. /* The HRModeInfo structure are ordered by ColorDeep */
  29. /* then by X and Y resolution */
  30.  
  31. struct HRModeInfo
  32. {
  33.     struct HRModeInfo *next, *prev;
  34.  
  35.     UWORD ResWidth;            /* Resolution width */
  36.     UWORD ResHeight;            /* Resolution height */
  37.     UWORD MaxWidth;            /* Maximal moegliche Breite fuer den Modus */
  38.     UWORD MaxHeight;            /* Maximal moegliche Hoehe fuer den Modus */
  39.     UWORD MinWidth;            /* Minimal moegliche Breite fuer den Modus */
  40.     UWORD MinHeight;            /* Minimal moegliche Hoehe fuer den Modus */
  41.     WORD    CurOffX;                /* Cursor Offset X */
  42.     WORD    CurOffY;                /* Cursor Offset Y */
  43.  
  44.     ULONG ClockFreq;            /* Base Clock of the PLL in kHz */
  45.  
  46.     ULONG    HFreq;                /* Horizontal-Freq in Hz */
  47.     UWORD    VFreq;                /* Vertical-Freq in Hz */
  48.     UBYTE AspectX;
  49.     UBYTE AspectY;
  50.     ULONG ModeFlags;            /* Flags for the Display type */
  51.     UWORD    BitMapType;            /* (BitMap.Mode<<8 | BitMap.BitsPerPixel) */
  52.     ULONG SpecialFlags;        /* Flags for Mode Aspect and other things */
  53.     UWORD Usage;                /* Number of usage for this mode */
  54.  
  55.     /* PRIVATE    */
  56.     
  57.     ULONG    ColorMode;                /* private */
  58.     ULONG    ResFlags;                /* private */
  59.  
  60.     UBYTE    Clock;                        /* Domino 0-7 / Merlin 0-15 */
  61.     UBYTE    ClockDivide;                /* 1,2,4 */
  62.     UWORD    H_Total;                        /*  9    Bit (0,3F)        */
  63.     UWORD    H_BlankStart;                /*  9 Bit (2,3F)        */
  64.     UWORD    H_BlankEnd;                    /*  6 Bit (3,5)        */
  65.     UWORD H_SyncStart;                /*     9 Bit (4,3F)        */
  66.     UWORD H_SyncEnd;                    /*  5 Bit (5)            */
  67.     UBYTE    H_SyncSkew;                    /*  2 Bit (5)            */
  68.     UBYTE H_DisplayEnableSkew;        /*  2 Bit (3)            */
  69.     UWORD    V_Total;                        /* 11    Bit (6,7,35)    */
  70.     UWORD V_BlankStart;                /*    11 Bit (15,7,9,35)*/
  71.     UWORD V_BlankEnd;                    /*  8 Bit (16)            */
  72.     UWORD    V_SyncStart;                /* 11 Bit (10,7,35)    */
  73.     UWORD    V_SyncEnd;                    /*  4 Bit (11)            */
  74.  
  75.     UBYTE    ScanlinesPerChar;            /*  5 Bit (9)             */
  76.     UBYTE    BytePanning;                /*  2 Bit (8)             */
  77.     UBYTE    InitialRowAdress;            /*  5 Bit (8)            */
  78.     UBYTE Pad1;
  79.     APTR    CardModeAdds;                /* Reserved for Future extensions */
  80. };
  81.  
  82. /* Definitions for the ModeFlags of the HRModeInfo structure */
  83.  
  84. #define HRMB_Interlace        0
  85. #define HRMB_DoubleScan        1
  86. #define HRMB_Scrollable        2
  87. #define HRMB_SplitView        3
  88. #define HRMB_SecondView        4    /* Nicht bei Domino */
  89. #define HRMB_Cursor            5    /* Nicht bei Domino */
  90.  
  91. #define HRMF_ALL                0xffffffffL
  92. #define HRMF_Interlace        (1L<<HRMB_Interlace)
  93. #define HRMF_DoubleScan        (1L<<HRMB_DoubleScan)
  94. #define HRMF_Scrollable        (1L<<HRMB_Scrollable)
  95. #define HRMF_SplitView        (1L<<HRMB_SplitView)
  96. #define HRMF_SecondView        (1L<<HRMB_SecondView)
  97. #define HRMF_Cursor            (1L<<HRMB_Cursor)
  98.  
  99. /* Definitions for the Special-Flags */
  100.  
  101. #define HRMSB_FLUSH            0        /* ModeInfo is not longer useable */
  102. #define HRMSB_VIDEO            1        /* ModeInfo supports FBAS/YC - VIDEO */
  103. #define HRMSB_31KHZ            2        /* ModeInfo avoid monitor resync */
  104.  
  105. /* The following is for Aspect considerations */
  106. /* It will be possible to search for a ScreenMode by this Flags.. */
  107. /* e.x. A HAM Lace Picture will normally match "HRMSF_LORES|HRMSF_LACE|HRMSF_PAL" */
  108.  
  109. #define HRMSB_HIRES            3        /* Aspects like Amiga 640x PAL/NTSC */
  110. #define HRMSB_LORES            4        /* Aspects like Amiga 320x PAL/NTSC */
  111. #define HRMSB_LACE            5        /* Aspects like Amiga Lace Modes */
  112. #define HRMSB_1BY2            6        /* Double as WIDTH as HEIGHT */
  113. #define HRMSB_2BY1            7        /* Double as HEIGHT as WIDTH */
  114. #define HRMSB_VGA                8        /* Aspects like IBM (GIF) [4/3] */
  115. #define HRMSB_PAL                9        /* Aspects like PAL [5/4] */
  116. #define HRMSB_NTSC            10        /* Aspects like NTSC [5/3] */
  117.  
  118. #define HRMSF_FLUSH            (1<<HRMSB_FLUSH)
  119. #define HRMSF_VIDEO            (1<<HRMSB_VIDEO)
  120. #define HRMSF_31KHZ            (1<<HRMSB_31KHZ)
  121.  
  122. #define HRMSF_HIRES            (1<<HRMSB_HIRES)
  123. #define HRMSF_LORES            (1<<HRMSB_LORES)
  124. #define HRMSF_LACE            (1<<HRMSB_LACE)
  125. #define HRMSF_1BY2            (1<<HRMSB_1BY2)
  126. #define HRMSF_2BY1            (1<<HRMSB_2BY1)
  127. #define HRMSF_VGA                (1<<HRMSB_VGA)
  128. #define HRMSF_PAL                (1<<HRMSB_PAL)
  129. #define HRMSF_NTSC            (1<<HRMSB_NTSC)
  130.  
  131. /* Definitions for the  Res(mode)-Flags */
  132.  
  133. #define HRMRESB_16BPC        0        /* Use 16 Bit Per Pixel Clock */
  134. #define HRMRESB_DomBPC        1        /* Use the "Domino Spezial" Mode */
  135. #define HRMRESB_SYNCPH     2        /* Horizontal Sync Polarity Change */
  136. #define HRMRESB_SYNCPV        3        /* Vertical Sync Polarity Change */
  137. #define HRMRESB_PELCLKby2    4        /* Halve Horizontal Pixel-Rate */
  138. #define HRMRESB_9DPCC        5        /* 9 instead of 8 DotPer Character Clock */
  139.  
  140. #define HRMRESF_16BPC        (1<<HRMRESB_16BPC)
  141. #define HRMRESF_DomBPC        (1<<HRMRESB_DomBPC)
  142. #define HRMRESF_SYNCPH        (1<<HRMRESB_SYNCPH)
  143. #define HRMRESF_SYNCPV        (1<<HRMRESB_SYNCPV)
  144. #define HRMRESF_PELCLKby2    (1<<HRMRESB_PELCLKby2)
  145. #define HRMRESF_9DPCC        (1<<HRMRESB_9DPCC)
  146.  
  147. #endif
  148.  
  149.